package com.hgts.utils;

import com.hgts.pojo.User;
import com.hgts.pojo.dto.EmployeeDto;
import com.hgts.pojo.dto.UserDto;


public class UserHolder {
    private static final ThreadLocal<EmployeeDto> tl = new ThreadLocal<>();

    private static final ThreadLocal<UserDto> tl1 = new ThreadLocal<>();

    public static void saveUser(EmployeeDto employeeDto){
        tl.set(employeeDto);
    }

    public static void saveUserWx(UserDto userDto){
        tl1.set(userDto);
    }

    public static EmployeeDto getUser(){
        return tl.get();
    }

    public static UserDto getUserWx(){
        return tl1.get();
    }

    public static void removeUser(){
        tl.remove();
    }
}
